package com.dhecp.project.storage.service;

import java.util.List;
import java.util.Map;

import com.dhecp.common.core.domain.AjaxResult;
import com.dhecp.project.storage.domain.OfflinePurchaseStorage;

public interface OfflinePurchaseStorageService {


    /**
     *@Description: 查询前一单NID、BID
     *@Param: nid 必要参数：当前 单据编码
     *@return: AjaxResult (data.nid 前一单NID， data.bid 前一单BID)
     *@Author: hlf
     *@date: 2022-05-09 9:35
     */
    AjaxResult queryLastNid(Map<String, Object> params) throws Exception;

    /**
     *@Description: 查询后一单NID、BID
     *@Param: nid 必要参数：当前 单据编码
     *@return: AjaxResult (data.nid 后一单NID， data.bid 后一单BID)
     *@Author: hlf
     *@date: 2022-05-09 9:40
     */
    AjaxResult queryNextNid(Map<String, Object> params) throws Exception;

    /**
     *@Description: 查询指定单nid的首记录
     *@Param: nid 必要参数：当前 单据编码
     *@return: com.dhecp.project.storage.domain.OfflinePurchaseStorage
     *@Author: hlf
     *@date: 2022-05-09 9:40
     */
    OfflinePurchaseStorage queryFirstRecord(Map<String, Object> params) throws Exception;

    /**
     *@Description: 查询指定单nid的整单录
     *@Param: nid 必要参数：当前 单据编码
     *@return: java.util.List<com.dhecp.project.storage.domain.OfflinePurchaseStorage>
     *@Author: hlf
     *@date: 2022-05-09 9:41
     */
    List<OfflinePurchaseStorage> queryListByNid(Map<String, Object> params) throws Exception;

    /**
     */
    OfflinePurchaseStorage queryByGuid(String guid);

    /**
     *@Description: 查询
     *@Param: [params]
     *@return: java.util.List<com.dhecp.project.storage.domain.OfflinePurchaseStorage>
     *@Author: hlf
     *@date: 2022-05-09 9:41
     */
    List<OfflinePurchaseStorage> queryList(Map<String, Object> params) throws Exception;

    /**
     *@Description: 查询
     *@Param: [params]
     *@return: java.util.List<com.dhecp.project.storage.domain.OfflinePurchaseStorage>
     *@Author: hlf
     *@date: 2022-05-09 9:41
     */
    List<OfflinePurchaseStorage> queryGroupList(Map<String, Object> params) throws Exception;

    /**
     *@Description: 查询采购订单数据
     *@Param: [params]
     *@return: java.util.List<com.dhecp.project.storage.domain.OfflinePurchaseStorage>
     *@Author: hlf
     *@date: 2022-05-09 9:41
     */
    List<OfflinePurchaseStorage> selectOrderData(Map<String, Object> params) throws Exception;
    List<OfflinePurchaseStorage> selectOfflineOrderData(Map<String, Object> params) throws Exception;
    
    List<OfflinePurchaseStorage> selectOfflinePurchaseStorage(String bid) throws Exception;

    /**
     *@Description: 保存
     *@Param: moduleTable 必要参数：功能唯一标识
     *@Param: infoMap 必要参数：非网格字段（包括头部、底部所有显示和隐藏的字段）
     *@Param: infoItems 必要参数：对应实体类的json格式字符串
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-05-09 9:41
     */
    AjaxResult saveData(Map<String, Object> params);

    /**
     *@Description: 删除
     *@Param: [params]
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-05-09 9:42
     */
    AjaxResult deleteData(Map<String, Object> params);

    /**
     *@Description: 修改删除标志（预留）
     *@Param: infoItems 必要参数：对应实体类的json格式字符串（仅需 guid 和 deleted）
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-05-09 9:42
     */
    AjaxResult updateDeleted(Map<String, Object> params);

    /**
     *@Description: 流转  —— 添加流程任务、修改流程状态及生效标志
     *@Param: infoMap 必要参数：非网格字段（包括头部、底部所有显示和隐藏的字段）
     *@Param: infoItems 必要参数：对应实体类的json格式字符串（仅需 guid）
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-05-09 9:42
     */
    AjaxResult updateFlowGo(Map<String, Object> params);

    /**
     *@Description: 退回  —— 添加流程任务、修改流程状态及生效标志
     *@Param: infoMap 必要参数：非网格字段（包括头部、底部所有显示和隐藏的字段）
     *@Param: infoItems 必要参数：对应实体类的json格式字符串（仅需 guid）
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-05-09 9:44
     */
    AjaxResult updateFlowBack(Map<String, Object> params);



    /**
     *@Description: 修改状态
     *@Param: guid 唯一标识
     *@return: com.dhecp.common.core.domain.AjaxResult
     *@Author: hlf
     *@date: 2022-08-17 14:56
     */
    AjaxResult updateType(Map<String, Object> params);



    /**
     * 导入
     * @param moduleTable 必要参数：功能唯一标识
     * @param infoItems 必要参数：对应实体类的json格式字符串（导入的字段用户内容）
     * @return AjaxResult
     * @author DH-Xxj
     */
    AjaxResult saveImportData(Map<String, Object> params);


}
